﻿using Anke.SHManage.MSSQLDAL.TJDAL;
using Microsoft.Reporting.WebForms;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Anke.SHManage.Web.Reports
{
    public partial class DriverReportPrintModeWebForm : System.Web.UI.Page
    {
       protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Data_Binding();
            }
        }

       private void Data_Binding()
       {
           string id = Request.QueryString["ID"];
           this.ReportViewer1.LocalReport.DataSources.Clear();
           this.ReportViewer1.LocalReport.ReportPath = Server.MapPath(@"~/Reports/DriverReport.rdlc");
           //Microsoft.Reporting.WebForms.ReportParameter st = new Microsoft.Reporting.WebForms.ReportParameter("StartTime", start1);
           //Microsoft.Reporting.WebForms.ReportParameter ed = new Microsoft.Reporting.WebForms.ReportParameter("EndTime", end1);
           //this.ReportViewer1.LocalReport.SetParameters(new Microsoft.Reporting.WebForms.ReportParameter[] { st, ed });
           TJDAL dal = new TJDAL();
           DataTable dt1 = dal.Get_TJ_SJRBB(id);
           this.ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSetForD_DriverReportPrint", dt1));
           this.ReportViewer1.LocalReport.Refresh();
       }

    }
}